package com.fqgj.xjd.user.dao;

import com.fqgj.common.base.BaseMapper;
import com.fqgj.xjd.user.entity.UserAccessEntity;
import com.fqgj.xjd.user.entity.business.UserAccessInfoEntity;

import java.util.List;

/**
 * User: zhangxingyun
 * Date: 2017-07-22
 * Time: 21:48:31.101
 */

public interface UserAccessDao extends BaseMapper<UserAccessEntity> {

    UserAccessEntity selectUserAccessByUserCode(String userCode);


    UserAccessEntity selectUserAccessByToken(String token);

    UserAccessEntity selectUserByMobileAndAppCode(String mobile, String code);

    UserAccessEntity selectUserByMobile(String mobile);

    UserAccessEntity selectUserByMD5MobileAndAppCode(String mobile, String code);

    UserAccessEntity selectUserByMobileAndAppCodeAndBiz(String mobile, String code, Integer biz);

    List<UserAccessEntity> selectUserListByMobileListAndAppCode(List<String> mobileList, List<String> categories);

    List<UserAccessEntity> selectByCustomerCode(String customerCode);

    List<UserAccessEntity> selectListByCustomerCode(List<String> customerCodes);

    List<UserAccessEntity> selectListByUserCodes(List<String> userCodeList);

    int updateCustomerCodeByUserCode(String userCode, String customerCode);

    List<UserAccessEntity> selectListByUserIds(List<Long> userIds);

    Integer countByCondition(Integer appCode, String mobile, String identityNo, String name);

    List<UserAccessEntity> selectListByCondition(Integer appCode, String mobile, String identityNo, String name, Integer startIndex, Integer pageSize, List<String> categories);

    List<UserAccessInfoEntity> selectUserAccessListByMobile(String mobile);

    List<UserAccessInfoEntity> selectUserAccessListByMD5Mobile(String md5Mobile);

    List<UserAccessInfoEntity> selectUserAccessListByMD5MobileIdNo(String md5MobileIdNo);

}